/* Name: Nguyen Le Niem
nickname:Mark Integer
sdt:01646828033
*/
#include <stdio.h>
#include <conio.h>
#include <iostream.h>
class phanso{
      private:
              int tu;
              int mau;
      public:
             phanso(int tu=0, int mau=1){
                        this->tu=tu;
                        this->mau=mau;
                        };
             void inphanso(){
                  cout<<tu<<"/"<<mau;
                  cout<<endl;
                  };

             phanso operator - (phanso a){
                 phanso ketqua;
                 ketqua.tu=(this->tu*a.mau)-(this->mau*a.tu);
                 ketqua.mau=a.mau*this->mau;
                 return ketqua;
                 }
           phanso operator * (phanso a){
                 phanso ketqua;
                 ketqua.tu=this->tu*a.tu;
                 ketqua.mau=this->mau*a.mau;
                 return ketqua;
                 }
            phanso operator / (phanso a){
                 phanso ketqua;
                 ketqua.tu=this->tu*a.mau;
                 ketqua.mau=this->mau*a.tu;
                 return ketqua;
                 }

             };

           int main(){
               phanso a(1,2);
               phanso b(3,2);
               phanso c=a-b;
               phanso d=a*b;
               phanso e=a/b;
               c.inphanso();
               d.inphanso();
               e.inphanso();
               getch();
               }

